package com.longshine.tools.util;
/**
 * 一些常量
 * @author Administrator
 *
 */
public class Dispacher {

	//电池仓类型
	public final static String TYPE_BATTERY_BOX = "UPC";
	//视觉系统类型
	public final static String TYPE_REC_SYSTEM = "VISION";
	//机器人系统类型
	public final static String TYPE_REBOT_SYSTEM = "ROBOT";
	// 工位类型
	public final static String TYPE_WORK_STATION = "WORK";
	//中转台
	public final static String TYPE_TRANSIT_STATION = "TRANSIT";
//	安全系统类型
	public final static String TYPE_SECURITY_SYSTEM = "CAMERA";
	
	//机器人控制
	public final static String TYPE_ROBOT_CTRL = "ROBOT_CONTROL";
	
	//public final static String 
	

	//设备类型字段
	public final static String MSG_WORD_TYPE = "messageType";
	//设备字段
	public final static String MSG_WORD_EQUIP = "equip";
	//设备编号字段
	public final static String MSG_WORD_EQUIPNO = "equipNo";
	//成功标志
	public final static String SUC_FLAG = "0000";
	//开启时定位动作
	public final static int OPEN_LOCATE_ACTION = 1;
	public final static int CLOSE_LOCATE_ACTION = 0;
	public final static String DB_WORD_ROBOT 		= 		StringUtil.toJavaString("CHG_ROBOT_NO");
	public final static String DB_WORD_RECOGNITION 	= 		StringUtil.toJavaString("CAMERA_NO");
	public final static String DB_WORD_SECURITY 	= 		StringUtil.toJavaString("SECURITY_NO");
	public final static String DB_WORD_BATTERY_BOX 	= 		StringUtil.toJavaString("BATBOX_NO");
	public final static String DB_WORD_TRANSIT 		= 		StringUtil.toJavaString("TRANSIT_NO");
	public final static String DB_WORD_TRANSIT_AREA = 		"";
	public final static String DB_WORD_CHARGE_CNT = "chargedCnt";//今日 换电次数
	public final static String DB_WORD_WARN_CNT="warnCnt";//今日告警次数
	public final static String DB_WORD_FULLBAT_CNT="";//满电池数
	public final static String DB_WORD_BREAK_CNT ="";//今日故障次数
	public final static String DB_WORD_EMPTY_BATBOX_CNT = "";//空闲仓位数
	public final static String DB_WORD_BREAK_BOX_CNT = "errCnt";//故障仓位数
	
	
	//空电池状态
	public final static int STATE_EMPTY_BATTERY = 0;
	//满电池状态
	public final static int STATE_FULL_BATTERY = 1;
	
	public final static int SUC = 0;
	public final static int FAIL = 1;
	
	public final static int STATE_REC_SYSTEM_CON_INT=1;//通讯中断
	public final static int STATE_REC_SYSTEM_IDLE=4;//空闲
	public final static int STATE_REC_SYSTEM_WORKING = 5;//定位
	public final static int STATE_REC_SYSTEM_BREAK = 3;//故障
	public final static int STATE_REC_SYSTEM_STOPPED = 2;//停机
	
	
	public final static int STATE_SECU_SYSTEM_CON_INT = 1;
	public final static int STATE_SECU_SYSTEM_IDLE = 4;//待机
	public final static int STATE_SECU_SYSTEM_WORKING = 5;
	public final static int STATE_SECU_SYSTEM_REVOKED = 6;
	public final static int STATE_SECU_SYSTEM_BREAK = 3;
	public final static int STATE_SECU_SYSTEM_STOPPED = 2;
	public final static int STATE_SECU_SYSTEM_WARNING = 7;
	
	public final static int STATE_ROBOT_SYSTEM_CON_INT=1;
	public final static int STATE_ROBOT_SYSTEM_IDLE=4;
	public final static int STATE_ROBOT_SYSTEM_WORKING=6;
	public final static int STATE_ROBOT_SYSTEM_BREAK=3;
	public final static int STATE_ROBOT_SYSTEM_STOPPED=2;
	public final static int STATE_ROBOT_SYSTEM_PAUSEED=5;
	public final static int STATE_ROBOT_SYSTEM_MANAL=7;
	
	public final static int STATE_BATBOX_SYSTEM_LOGIN_OFF = 11;
	public final static int STATE_BAXBOX_SYSTEM_LOGIN_ON = 10;
	
	public final static int STATE_WORK_STATION_IDLE = 01;
	public final static int STATE_WORK_STATION_LOACTE = 02;
	public final static int STATE_WORK_STATTION_WAITING = 03;
	public final static int STATE_WORK_STATION_CHARGING = 04;
	public final static int STATE_WORK_STATION_CARGED = 05;
	public final static int STATE_WORK_STATION_BATTRANS = 06;
	
	public final static int STATE_TRANS_HAS_BAT=1;
	public final static int STATE_TRANS_NONE_BAT=0;
	public final static int STATE_TRANS_FULL_HAS = 11;
	
	
	public final static int STATE_HANDLER_NONE = 0x4;
	public final static int STATE_HANDLER_PUSHOUT = 0x0;
	public final static int STATE_HANDLER_UP_GRIP = 0x1f;
	public final static int STATE_HANDLER_BEHIND_GRIP = 0x1c;
	public final static int STATE_HANDLER_PUSHORPOP_READY = 0x1d;
	public final static int STATE_HANDLER_BAT_PUSH = 0x18;
	public final static int STATE_HANDLER_BAT_POP = 0x19;
	
	
	//空电池类型
	public final static int BATTERY_TYPE_EMPTY = 0;
	//满电池
	public final static int BATTERY_TYPE_FULL = 1;
	//无电池
	public final static int BATTERY_TYPE_NONE = 0;
	//有电池
	public final static int BATTERY_TYPE_HAS = 1;
	
	public final static  int CAR_BAT_LOCATE_ACTION_IN = 0;//装电池定位动作"
	public final static int CAR_BAT_LOCATE_ACTION_OUT = 1;//取电池定位动作
	
	public final static String BTN_SETUP_PROTECTION = "#SETUP";//设防按钮
	public final static String BTN_SETDOWN_PROTECTION = "#SETDOWN";//撤防
	public final static String BTN_STOP = "#STOP";//停机
	public final static String BTN_RESET = "#RESET";
	public final static String BTN_START = "#START";//启动
	public final static String BTN_PAUSE = "#PAUSE";//暂停
	public final static String BTN_RESUM = "#GOON";//继续
	public final static String BTN_EMERGENCY_STOP = "#EMERGENCY_STOP";//紧急停机
	public final static String BTN_EXIT = "#EXITSYS";//退出
	public final static String BTN_EQUIP_MANAGE = "#EQUIPMENTCONTROL";
	public final static String BTN_OPEN_CARDOOR = "#OPEN_DOOR";//打开汽车仓门
	public final static String BTN_CLOSE_CARDOOR = "#CLOSE_DOOR";//关闭汽车仓门
	public final static String BTN_GET_F_BAT = "#TO_1TRANSIT";	//取出电池放入中转台1号区域
	public final static String BTN_GET_S_BAT = "#TO_2TRANSIT";//取出电池放入中转台1号区域
	public final static String BTN_PUT_T_BAT = "#3TRANSIT_TO_CAR";//中转台3号区域是池放入汽车
	public final static String BTN_PUT_F_BAT = "4TRANSIT_TO_CAR";//中转台4号区域是池放入汽车
	public final static String BTN_PUT_F_BAT_BOX = "#UPC_BAT_TO_LOC3";//取出电池仓电池放入中转台1号区域
	public final static String BTN_PUT_S_BAT_BOX = "#UPC_BAT_TO_LOC4";//取出电池仓电池放入中转台2号区域
	public final static String BTN_GET_T_BAT_BOX = "#LOC1_TO_UPC";//中转台3号区域是池放入电池仓
	public final static String BTN_GET_F_BAT_BOX = "#LOC2_TO_UPC";//中转台4号区域是池放入电池仓
	public final static String BTN_ALL_FLOW_START = "#ALLFLOW_START";//开始全部流程
	public final static String BTN_BATFLOW_START="#BATFLOW_START";
	public final static String BTN_CARFLOW_START = "#CARFLOW_START";
	public final static String BTN_DIALOG_CLOSE = "#BUTTON_CLOSE";
	public final static String BTN_VIEWALARM = "#VIEWALARM";//看查报警
	public final static String BTN_DISALARM = "#DISALARM";//解除报警
	
	public final static int SYSTEM_TYPE_ROBOT = 2;
	public final static int SYSTEM_TYPE_REC = 1;
	public final static int SYSTEM_TYPE_SECU = 3;
	public final static int SYSTEM_TYPE_BAT_BOX = 4;
	public final static int SYSTEM_TYPE_PLC = 5;
	public final static int SYSTEM_TYPE_WORK = 10;
	
	
	public final static String JS_STATE_LABEL_ROBOT = "#ROBOT_STATE";
	public final static String JS_STATE_LABEL_REC = "#VISION_STATE";
	public final static String JS_STATE_LABEL_SECU = "#CAMERA_STATE";
	public final static String JS_STATE_LABEL_BAT_BOX = "#STATE";
	
	public final static String JS_LABEL_CHARGE_CNT = "#CHANGE_TRAM_TIME";
	public final static String JS_LABEL_WARN_CNT = "#ALARM_NUMS";
	public final static String JS_LABEL_FULL_BAT_CNT = "#FULL_BATS";
	public final static String JS_LABEL_BREAK_CNT = "#FAULT_NUMS";
	public final static String JS_LABEL_EMP_BAT_CNT = "#FREE_LOCS";
	public final static String JS_LABEL_BREAK_BOX_CNT = "#ERROR_LOCS";
	
	public final static int PROC_STATE_LOCATE = 1;//在车辆定位流程中
	public final static int PROC_STATE_CHARGING = 2;//自动换电流程 中
	public final static int PROC_STATE_EMP_TRANS = 3;//空电池中转流程中
	//
	public final static int PROC_STATE_FULL_TRANS = 4;//满电池中转流程中
	
	public final static int PROC_STATE_NO_FLOW = 0;
	
	public final static String BATBOX_WORD_SPACE_STATUS="spaceStatus";
	public final static String BATBOX_WORD_CHARGER_STATUS="chargerStatus";
	public final static String BATBOX_WORD_FULL_STATUS="fullStatus";
	public final static String BATBOX_WORD_FAULT_STATUS="faultStatus";
	public final static String BATBOX_WORD_DOOR_STATUS = "doorstatus";
	
	public final static int PROCESS_TYPE_CHARGE = 1;
	public final static int PROCESS_TYPE_TRANSIT = 2;
	public final static int PROCESS_TYPE_ALL = 3;
	
	public final static int RET_VALUE_SUC = 1;
	public final static int RET_VALUE_FAIL = 0;
	public final static int RET_VALUE_TIMEOUT = -1;
	public final static int RET_VALUE_ERR = -2;
	
	public final static String KEY_SENSORS_RIGHT = "rightSensors";
	public final static String KEY_SENSORS_LEFT = "leftSensors";
	public final static String KEY_SENSORS_CYLINDER = "cylinderSensors";
	public final static String KEY_SENSORS_ABOVE = "aboveSensors";
	public final static String KEY_SENSORS_BEHIND = "behindSensors";
	
	public final static int RESULT_YES = 1;
	public final static int RESUT_NO = 0;
	public final static int RESULT_ERR = -1;
	
	public final static String EXCEP_ALARM_HUMAN = "2005";
	public final static String EXCEP_ALARM_THING = "2006";
	public final static String EXCEP_NONE = "FFFF";
	public final static String EXCEP_BAT_NONE = "0000";
	public final static String EXCEP_BAT_EXIST = "FFFF";
	
	
	public final static int TRANS_ACTION_LOAD_BATBOX = 1;
	public final static int TRANS_ACTION_TAKEOUT_BATBOX = 2;
	public final static int TRANS_ACTION_LOAD_AND_TAKEOUT_BATBOX = 3;
	public final static int TRANS_ACTION_TAKEOUT_AND_LOAD_BATBOX = 4;
	
	public final static int SECU_COMMAND_STATUS_NOT = 0;
	public final static int SECU_COMMAND_STATUS_EXECING = 1;
	public final static int SECU_COMMAND_STATUS_EXEC_FAIL = 3;
	public final static int SECU_COMMAND_STATUS_EXEC_SUC = 2;
	
	
	public final static int POLICY_BREAK_IN_STOP_FLOW = 1;//流程停止
	public final static int POLICY_BREAK_IN_ALARM = 2;//流程报警
	public final static int POLICY_BREAK_IN_PAUSE = 3;//流程暂停方案
	
	
	public final static int BIT_TRUE = 1;
	public final static int BIT_FALSE = 0;
	public final static int BIT_NOT = 0;
	public final static int BIT_READY = 1;
	public final static int BIT_WORK = 2;
	public final static int BIT_BREAK = 3;
	
	public final static int STATE_TRANS_FULLAREA_EXIST = 11;
	public final static int STATE_TRANS_FULLAREA_NONE = 10;
	public final static int STATE_TRANS_EMPAREA_EXIT = 1;
	public final static int STATE_TRANS_EMPAREA_NONE = 0;
	
	public final static String FLAG_SENSOR_INFO = "sensorInfo";

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}

